# Created with pycharm
# author:ju bai
# Date:2021/7/20
# Time:10:25
from selenium import webdriver
import time
import os
from selenium.webdriver.common.action_chains import ActionChains

driver = webdriver.Chrome()
# 本地HTML
url = "file:///"+os.path.abspath("D:/Python/selenium2html/drop_down.html")
driver.get(url)
driver.maximize_window()
time.sleep(3)

# 下拉框
# xpath
# driver.find_element_by_xpath("//*[@id='ShippingMethod']").click()

options = driver.find_element_by_tag_name("option")

# for option in options
#     if option.get_attribute('value') == '10.69':
#         option.click()

options[2].click()

time.sleep(3)
driver.quit()